function [ w,pj ] = prepareBomber( vn,n )
%% The function prepareBomber creates the values w and pj for the Ferguson
%% bomber.
w=0;
e=0.001;
while 3/4>(n*n+1)*w;
    e=e/10;
    w=vn-e;
end
a=(1-(n^2+1)*w)^(-1);
C1=0.5*(1-(((n^2-1)*a+2)/((n^2+1)*sqrt(a*a-4*a))));
C2=1-C1;

pj(1)=1;  %t=0
pj(2)=C1*(((a+sqrt(a^2-4*a))/2)^(1))+C2*(((a-sqrt(a^2-4*a))/2)^(1)); %t=1
pj(3)=C1*(((a+sqrt(a^2-4*a))/2)^(2))+C2*(((a-sqrt(a^2-4*a))/2)^(2)); %t=2

k=3;
while (pj(k)>pj(k-1))
    pj=[pj,C1*(((a+sqrt(a^2-4*a))/2)^(k))+C2*(((a-sqrt(a^2-4*a))/2)^(k))];
    k=k+1;
end

denom=pj(1)+(n^2+1)*sum(pj(2:end));

pj=pj/denom;

end

